/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 *//*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package xlaucher;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author Ytong
 */
public class Use {
    final static String filePath="H:/mc/Minecraft 1.7.2/.minecraft/";
        static public void print(String st) {
        System.out.println(st);
    }
      static public void print(boolean st) {
        System.out.println(st);
    }   
     public static String readfile(String path){
          FileReader a = null;
            try {
                a = new FileReader(path);
            } catch (FileNotFoundException ex) {
                Logger.getLogger(MW.class.getName()).log(Level.SEVERE, null, ex);
            }
            char c[] = new char[99999];
            int i = 0;
            try {
                i = a.read(c);
            } catch (IOException ex) {
                Logger.getLogger(MW.class.getName()).log(Level.SEVERE, null, ex);
            }
            String text = new String(c, 0, i);
            return text;
     }
     public static String rundir() throws IOException{
    String s=new File(".").getCanonicalPath();
 //   System.out.println(s);
    if(Laucher.CheckOS()==0) 
        s=s.replace("/","\\");
    return  s;
     //    return "J:/client";
     }
     public static void WriteFile(File f,String s) throws IOException{
         FileWriter w=new FileWriter(f);
         w.write(s);
         w.close();
     }
}
